import 'package:fluro/fluro.dart';
import 'package:flutter/material.dart';
// 页面
import './collapse_test.dart';
import './animate_test/animate_test.dart';
import './hero_test/hero_test_1.dart';
import './hero_test/hero_test_2.dart';
import './lottie_test.dart';

class AnimatePageRouteMap {
  final String collapseTest = 'collapse_test';

  final String animateTest = 'animate_test';

  final String heroTest1 = 'hero_test_1';

  final String heroTest2 = 'hero_test_2';

  final String lottieTest = 'lottie_test';

  static void Function(FluroRouter) define = handleDefine;
}

void handleDefine(FluroRouter router) {
  AnimatePageRouteMap routeMap = AnimatePageRouteMap();

  router.define(
    routeMap.collapseTest,
    handler: Handler(
      handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
        return CollapseTest();
      },
    ),
  );

  router.define(
    routeMap.animateTest,
    handler: Handler(
      handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
        return AnimateTest();
      },
    ),
  );

  router.define(
    routeMap.heroTest1,
    handler: Handler(
      handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
        return HeroTest1();
      },
    ),
  );

  router.define(
    routeMap.heroTest2,
    handler: Handler(
      handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
        return HeroTest2();
      },
    ),
  );

  router.define(
    routeMap.lottieTest,
    handler: Handler(
      handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
        return LottieTest();
      },
    ),
  );
}
